Browse our Products

Aspose.3D for Java 19.9 Notes de Libération

Améliorations et changements

CléRésuméCatégorie
THREEDNET-532Exportez la scène 3D vers HTMLNouvelle caractéristique
THREEDNET-561Exposer les propriétés de transformation géométriqueAmélioration
THREEDNET-556La rotation géométrique semble incorrecteBug

Public API et changements incompatibles vers l’arrière

Voir la liste de toutes les modifications apportées au public API telles que les membres ajoutés, renommés, supprimés ou dépréciés ainsi que toute modification non rétrocompatible apportée au Aspose.3D for Java. Si vous avez des préoccupations concernant un changement répertorié, veuillez le soulever sur leAspose.3D forum de soutien.

Ajouté nouveaux formats de fichier HTML5/ASPOSE3D _ WEB

 /**

\* Aspose.3D Web format.

*/

public static final FileFormat ASPOSE3D_WEB;

/**

\* HTML5 File

*/

public static final FileFormat HTML5;

Lorsque vous exportez la scène dans le fichier HTML5, il y aura en fait 3 fichiers, un fichier HTML, un fichier Aspose3DWeb (*.a3dw) et un fichier JavaScript rendu, vous ne pouvez exporter le fichier a3dw qu’en spécifiant le Aspose3DWeb comme type d’exportation et en réutilisant le fichier javascript dans votre propre page HTML.

Code d’échantillon:

 Scene scene = new Scene();

Node node = scene.getRootNode().createChildNode(new Cylinder());

LambertMaterial mat = new LambertMaterial();

mat.setDiffuseColor(new Vector3(0.34,0.59, 0.41));

node.setMaterial(mat);

Light light = new Light();

light.setLightType(LightType.POINT);

scene.getRootNode().createChildNode(light).getTransform().setTranslation(10, 0, 10);

scene.save("test.html", FileFormat.HTML5);
 python3 -m http.server

Puis ouvrez-lehttp:// localhost:8000/test.html. Le moteur de rendu Web utilise WebGL2, vous pouvez utiliserhttps://get.webgl.org/webgl2/Pour vérifier si votre navigateur le supporte ou non.

Ajout d’une nouvelle classe com.aspose. trois. HTML5SaveOptions

Cela vous permet de personnaliser la page 3D HTML exportée

Code d’échantillon:

 Scene scene = new Scene();

Node node = scene.getRootNode().createChildNode(new Cylinder());

LambertMaterial mat = new LambertMaterial();

mat.setDiffuseColor(new Vector3(0.34,0.59, 0.41));

node.setMaterial(mat);

Light light = new Light();

light.setLightType(LightType.POINT);

scene.getRootNode().createChildNode(light).getTransform().setTranslation(10, 0, 10);

HTML5SaveOptions opt = new HTML5SaveOptions();

opt.setShowGrid(false); // Turn off the grid

opt.setShowUI(false); //Turn off the user interface

scene.save("test.html", FileFormat.HTML5);

Ajout d’une nouvelle propriété FileFormat dans la classe com.aspose.threed.IOConfig

 /**

 * Gets the file format that specified in current Save/Load option.

 */

public FileFormat getFileFormat();

Ajout d’une nouvelle méthode évaluateGlobalTransform en classe com.aspose.threed.Node

 /**

 * Evaluate the global transform, include the geometric transform or not.

 * @param withGeometricTransform Whether the geometric transform is needed.

 */

public Matrix4 evaluateGlobalTransform(boolean withGeometricTransform);

La différence entre Node.GlobalTransform.TransformMatrix est qu’il vous permet d’obtenir une matrice de transformation avec une transformation géométrique, ce qui affecte uniquement l’entité attachée et garde les nœuds enfants non affectés.

Ajout d’un nouveau getter/setter-Geometrictranslation/setGeometricscaling/setGeometricscaling/getGeometriCrotation/setGeometrication en classe com.aspose. trois. Transformer.

 /**

 * Gets the geometric translation.

 * Geometric transformation only affects the entities attached and leave the child nodes unaffected.

 * It will be merged as local transformation when you export the geometric transformation to file types that does not support it.

 */

public Vector3 getGeometricTranslation();

/**

 * Sets the geometric translation.

 * Geometric transformation only affects the entities attached and leave the child nodes unaffected.

 * It will be merged as local transformation when you export the geometric transformation to file types that does not support it.

 * @param value New value

 */

public void setGeometricTranslation(Vector3 value);

/**

 * Gets the geometric scaling.

 * Geometric transformation only affects the entities attached and leave the child nodes unaffected.

 * It will be merged as local transformation when you export the geometric transformation to file types that does not support it.

 */

public Vector3 getGeometricScaling();

/**

 * Sets the geometric scaling.

 * Geometric transformation only affects the entities attached and leave the child nodes unaffected.

 * It will be merged as local transformation when you export the geometric transformation to file types that does not support it.

 * @param value New value

 */

public void setGeometricScaling(Vector3 value);

/**

 * Gets the geometric euler rotation(measured in degree).

 * Geometric transformation only affects the entities attached and leave the child nodes unaffected.

 * It will be merged as local transformation when you export the geometric transformation to file types that does not support it.

 */

public Vector3 getGeometricRotation();

/**

 * Sets the geometric euler rotation(measured in degree).

 * Geometric transformation only affects the entities attached and leave the child nodes unaffected.

 * It will be merged as local transformation when you export the geometric transformation to file types that does not support it.

 * @param value New value

 */

public void setGeometricRotation(Vector3 value);

Code d’échantillon:

 Node n = new Node();

n.getTransform().setGeometricTranslation(new Vector3(10, 0, 0));

System.out.println(n.evaluateGlobalTransform(true));

System.out.println(n.evaluateGlobalTransform(false));

La première instruction d’impression produira la matrice de transformation qui inclut la transformation géométrique tandis que la seconde ne le sera pas.


 
 Français