Skip to content

Commit bb9f361

Browse files
committed
Extend option descriptions
1 parent 7290950 commit bb9f361

File tree

2 files changed

+36
-19
lines changed

2 files changed

+36
-19
lines changed

Diff for: examples/convert-options.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class ColladaConverterOption {
6060
// Info
6161
var info_icon = $("<span>").addClass("glyphicon glyphicon-info-sign");
6262
var info_button = $("<button>").addClass("btn btn-info btn-block").attr("type", "button");
63-
(<any>info_button).popover({'title': option.title, 'content': option.description, 'placement': top, 'trigger': 'click hover'});
63+
(<any>info_button).popover({'title': option.title, 'html': true, 'content': option.description, 'placement': top, 'trigger': 'click hover'});
6464
info_button.append(info_icon);
6565
var info_group = $("<div>").addClass("col-sm-2");
6666
info_group.append(info_button);

Diff for: src/converter/options.ts

+35-18
Original file line numberDiff line numberDiff line change
@@ -94,47 +94,64 @@ module COLLADA.Converter {
9494

9595
constructor() {
9696
this.singleAnimation = new OptionBool("Single animation", true,
97-
"If enabled, all animations are merged into a single animation. Enable if each bone has a separate top level animation.");
97+
"Enabled: all animations are merged into a single animation (useful if each bone has a separate top level animation).<br/>" +
98+
"Disabled: animations are not merged.");
9899
this.singleGeometry = new OptionBool("Single geometry", true,
99-
"If enabled, all geometries are merged into a single geometry. Only has an effect if 'enableExtractGeometry' is enabled.");
100+
"Enabled: all geometries are merged into a single geometry. Only has an effect if 'enableExtractGeometry' is enabled.<br/>" +
101+
"Disabled: geometries are not merged.");
100102
this.singleBufferPerGeometry = new OptionBool("Single buffer", false,
101-
"If enabled, all chunks within one geometry use one set of vertex buffers, each chunk occupying a different part of each buffer.");
103+
"Enabled: all chunks within one geometry use one set of vertex buffers, each chunk occupying a different part of the buffer set.<br/>" +
104+
"Disabled: each chunk has its own set of buffers.");
102105
this.enableAnimations = new OptionBool("Animations", true,
103-
"If enabled, animations are exported. Otherwise, all animations are ignored.");
106+
"Enabled: animations are exported.<br/>" +
107+
"Disabled: all animations are ignored.");
104108
this.enableExtractGeometry = new OptionBool("Extract geometry", true,
105-
"If enabled, extracts all geometries from the scene and detaches them from their scene graph nodes. Otherwise, geometries remain attached to nodes.");
109+
"Enabled: extract all geometries from the scene and detach them from their scene graph nodes.<br/>" +
110+
"Disabled: geometries remain attached to nodes.");
106111
this.enableResampledAnimations = new OptionBool("Resampled animations", true,
107-
"If enabled, generates resampled animations for all skeleton bones.");
112+
"Enabled: generate resampled animations for all skeleton bones.<br/>" +
113+
"Disabled: do not generate resampled animations.");
108114
this.useAnimationLabels = new OptionBool("Animation labels", false,
109-
"If enabled, animations labels are used to split the global animation into separete animations.");
115+
"Enabled: animations labels are used to split the global animation into separete animations.<br/>" +
116+
"Disabled: only one global animation is exported.");
110117
this.animationLabels = new OptionArray<COLLADA.Converter.AnimationLabel>("Animation labels", [],
111-
"An array of animation labels ({name, begin, end, fps)} that describes how the global animation is split. Only has an effect if 'useAnimationLabels' is enabled.");
118+
"An array of animation labels ({name, begin, end, fps)} that describes how the global animation is split.<br/>" +
119+
"Only has an effect if 'useAnimationLabels' is enabled.");
112120
this.animationFps = new OptionFloat("Animation samples per second", 10, 0, 100,
113121
"Default FPS for resampled animations.");
114122
this.removeConstAnimationTracks = new OptionBool("Remove static animations", true,
115-
"If enabled, animation tracks are removed if they only contain the rest pose transformation for all times.");
123+
"Enabled: animation tracks are removed if they only contain the rest pose transformation for all times.<br/>" +
124+
"Disabled: all animation tracks are exported.");
116125
this.applyBindShape = new OptionBool("Apply bind shape", true,
117-
"If enabled, the positions and normals of skin-animated meshes are pre-multiplied by the bind shape matrix.");
126+
"Enabled: the positions and normals of skin-animated meshes are pre-multiplied by the bind shape matrix.<br/>" +
127+
"Disabled: the bind shape matrix needs to be manually exported and applied during rendering.");
118128
this.removeTexturePath = new OptionBool("Remove texture path", true,
119-
"If enabled, only the filename and extension of textures are kept and the remaining path is discarded.");
129+
"Enabled: only the filename and extension of textures are kept and the remaining path is discarded.<br/>" +
130+
"Disabled: original texture paths are kept.");
120131
this.sortBones = new OptionBool("Sort bones", true,
121-
"If enabled, bones are sorted so that child bones always appear after their parent bone in the list of bones.");
132+
"Enabled: bones are sorted so that child bones always appear after their parent bone in the list of bones.<br/>" +
133+
"Disabled: bones appear in their original order.");
122134
this.worldTransform = new OptionBool("World transform", false,
123-
"If enabled, all objects (geometries, animations, skeletons) are transformed as specified by the corresponding options.");
135+
"Enabled: all objects (geometries, animations, skeletons) are transformed as specified by the corresponding world transform options.<br/>" +
136+
"Disabled: the world transform options are ignored.");
124137
this.worldTransformBake = new OptionBool("Bake world transform", true,
125-
"If enabled, the world transformation is applied to skinned geometry. Otherwise, it is only applied to the bones.");
138+
"Enabled: the world transformation is applied to skinned geometry.<br/>" +
139+
"Disabled: the world transformation is applied to the bones.");
126140
this.worldTransformUnitScale = new OptionBool("World transform no node scale", true,
127-
"If enabled, the world scale will not add any scaling transformation to any nodes. The world scale will instead be distributed to the translation part of all local transformations.");
141+
"If enabled, the world scale will not add any scaling transformation to any nodes." +
142+
"The world scale will instead be distributed to the translation part of all local transformations.");
128143
this.worldTransformScale = new OptionFloat("World transform: scale", 1.0, 1e-6, 1e6,
129144
"Scale factor. See the 'worldTransform' option.");
130145
this.worldTransformRotationAxis = new OptionSelect("World transform: rotation axis", "none", ["none", "x", "y", "z"],
131146
"Rotation axis. See the 'worldTransform' option.");
132147
this.worldTransformRotationAngle = new OptionFloat("World transform: rotation angle", 0, 0, 360,
133148
"Rotation angle (in degrees). See the 'worldTransform' option.");
134149
this.truncateResampledAnimations = new OptionBool("Truncate resampled animations", true,
135-
"True: animation durations will be truncated in order to keep the requested FPS. False: requested FPS will be slightly modified to keep the original duration.");
136-
this.createSkeleton = new OptionBool("Generate a skeleton", true,
137-
"If true, a skeleton will be generated and all geometry will be attached to skeleton bones. If false, no skeleton is generated and all geometry will be static.");
150+
"Enabled: animation durations are truncated in order to keep the requested FPS.<br/>" +
151+
"Disabled: requested FPS is slightly modified to keep the original duration.");
152+
this.createSkeleton = new OptionBool("Generate skeleton", true,
153+
"Enabled: a skeleton is generated and all geometry is attached to skeleton bones.<br/>" +
154+
"Disabled: no skeleton is generated and all geometry is static.");
138155
}
139156

140157
}

0 commit comments

Comments
 (0)