Verge3D
  • 欢迎访问Verge3D中文用户手册
  • 入门指引(Getting Started)
    • 初学指南
    • 工作流程
    • 拼图工具
    • 功能特性
    • 项目结构
    • 更新版本
    • 常见问题
      • 3D文件格式
      • SolidWorks
      • Revit
    • 实用链接
  • 一般主题(General Topics)
    • 资产压缩
    • 基于HTML的用户界面
    • Facebook发布3D主题
    • AR 和VR的开发
    • Wordpress插件
    • 使用JavaScript
    • 移动浏览器测试
  • 3ds Max 艺术家指南(3ds Max Artist's Guide)
    • 3ds Max安装Verge3D​
    • 材质系统
    • 阴影
    • 物理材质
    • 透明度
    • 视口和渲染预览
  • Blender 艺术家指南(Blender Artist's Guide)
    • Blender安装Verge3D
    • 材质系统概述
    • 阴影
    • 物理材质
    • 透明度
    • 使用材质库
    • 视口预览
  • 拼图参考
    • Initialization(初始化)
    • Events(事件)
    • Selectors(选择器)
    • Objects
    • Materials
    • Animation
    • Camera
    • Scenes
    • Misc
    • Time
    • HTML
    • AR/VR
    • Sound
    • Physics
    • Post-processing
    • Dictionaries
    • Variables
    • Procedures
    • System
    • Library
  • 程序员指南(Programmer's Guide)
    • 编程基础
    • 矩阵变换
    • 动画系统
    • 创建文本
    • 绘制线条
    • 更新事物
    • 约定
    • 获取资源
  • 开发者参考(Developer Reference)
    • Animation
      • AnimationAction
      • AnimationClip
      • AnimationMixer
      • AnimationObjectGroup
      • AnimationUtils
      • KeyframeTrack
      • PropertyBinding
      • PropertyMixer
    • Animation / Tracks
      • BooleanKeyframeTrack
      • ColorKeyframeTrack
      • NumberKeyframeTrack
      • QuaternionKeyframeTrack
      • StringKeyframeTrack
      • VectorKeyframeTrack
    • Application
      • App
      • AppPuzzles
      • AppUtils
    • Audio
      • Audio
      • AudioAnalyser
      • AudioContext
      • AudioListener
      • PositionalAudio
    • Cameras
      • ArrayCamera
      • Camera
      • CubeCamera
      • OrthographicCamera
      • PerspectiveCamera
      • StereoCamera
    • Constants
      • Animation
      • Core
      • CustomBlendingEquation
      • DrawModes
      • DrawModes
      • Materials
      • Renderer
      • Textures
    • Constraints
      • ChildOfConstraint
      • Constraint
      • CopyLocationConstraint
      • CopyRotationConstraint
      • CopyScaleConstraint
      • FloorConstraint
      • LimitLocationConstraint
      • LimitRotationConstraint
      • LimitScaleConstraint
      • LockedTrackConstraint
      • TargetConstraint
      • TrackToConstraint
    • 开发者参考
      • Controls
      • Core
      • Core / BufferAttributes
      • Deprecated
      • Extras
      • Extras / Core
      • Extras / Curves
      • Extras / Objects
      • Geometries
      • Helpers
      • Lights
      • Lights / Shadows
      • Loaders
      • Loaders / Managers
      • Materials
      • Math
      • Math / Interpolants
      • Objects
        • Annotation
        • AnnotationControl
        • Bone
        • Group
        • Line
        • LineLoop
        • LineSegments
        • LOD
        • Mesh Points
        • Skeleton
        • SkinnedMesh
        • Sprite
      • Renderers
        • RenderUtils
        • WebGLRenderer
        • WebGLRenderTarget
        • WebGLRenderTargetCube
      • Renderers / Shaders
        • ShaderChunk
        • ShaderLib
        • UniformsLib
        • UniformsUtils
      • Scenes
        • Fog
        • FogExp2
        • Scene
        • SceneBackground
      • Textures
        • CanvasTexture
        • CompressedTexture
        • CubeTexture
        • DataTexture
        • DataTexture3D
        • DepthTexture
        • Texture
        • VideoTexture
  • EXAMPLES
    • 案例
  • MISC
    • 杂项
Powered by GitBook
On this page
  1. 拼图参考

HTML

PreviousTimeNextAR/VR

Last updated 5 years ago

These puzzles manipulate HTML DOM elements.

"add HTML element"

"get attribute"

"set attribute"

"set style"

"set css rule"

"event"

"get event property"

"window"

"document"

"body"

"draw line"

"remove line"

"bind element"

"init fullscreen"

"get URL data"

Retrieves URL data of the window to which an application is loaded:

  • Entire URL - text, e.g. "https://www.example.com/my_awesome_app.html?image_url=https://www.uploadserver.com/path/to/image.jpg"

  • Parameters - dictionary, e.g. {"image_url": "https://www.uploadserver.com/path/to/image.jpg"}

  • Host name - text, e.g. "www.example.com"

This puzzle may be useful in situations when the configuration data of an application are stored in its URL. For example, you can specify an image to be used as a texture in the following way:

https://www.example.com/my_awesome_app.html?image_url=https://www.uploadserver.com/path/to/image.jpg

See the Custom Image demo in your Verge3D distribution for a working example.

"set URL param"

This puzzle may be useful in situations when the configuration data of an application are stored in its URL. For example, you can specify an image to be used as a texture in the following way:

https://www.example.com/my_awesome_app.html?image_url=https://www.uploadserver.com/path/to/image.jpg

See the Custom Image demo in your Verge3D distribution for a working example.

"take screenshot"

"open file" and "opened file"

Creates an HTML element with a specified and identifier (corresponds to "id" attribute) and appends it to the document body. Also sets its style property "position" to "absolute".

Gets an from an HTML element with a specified id. The "in parent doc" checkbox should be enabled if the HTML element is located in an external HTML document (in which Verge3D application's .html file is embedded using iframe).

Sets an for an HTML element with a specified id. The "in parent doc" checkbox should be enabled if the HTML element is located in an external HTML document (in which Verge3D application's .html file is embedded using iframe). Also works with lists of element ids.

Sets a for an HTML element with a specified id. The "in parent doc" checkbox should be enabled if the HTML element is located in an external HTML document (in which Verge3D application's .html file is embedded using iframe). Also works with lists of element ids.

Sets a for a specified CSS rule (found in .css files of an application). The "in parent doc" checkbox should be enabled if the style sheets belong to an external HTML document (in which Verge3D application's .html file is embedded using iframe).

Registers an for an HTML element with a specified id. The "in parent doc" checkbox should be enabled if the HTML element is located in an external HTML document (in which Verge3D application's .html file is embedded using iframe). Once an event occurs, the puzzles placed in the "do" slot are triggered. Also works with lists of element ids.

Outputs the value of a of an event generated by the "event" puzzle.

Represents the - a browser tab or an iframe to which an HTML document is loaded.

Represents the - the root node of an HTML document.

Represents the - the <body> element of an HTML document.

Connects a specified 3D object with a specified HTML element by a dynamically updated line. The "in parent doc" checkbox should be enabled if the HTML element is located in an external HTML document (in which Verge3D application's .html file is embedded using iframe). You can also set the width, color and offset for the line.

Removes a previously created line from a specified object.

Makes a specified HTML element follow the center of a specified 3D object in screen space. The "in parent doc" checkbox should be enabled if the HTML element is located in an external HTML document (in which Verge3D application's .html file is embedded using iframe). A more customizable variant of the "add annotation" puzzle.

Makes a specified HTML element behave as a fullscreen mode button - the first click on it triggers entering the fullscreen mode, the second click exits fullscreen. Puzzles placed in the "on enter do" and "on exit do" slots are triggered upon entering or exiting the fullscreen mode. Puzzles placed in the "if unavailable do" are triggered if fullscreen is not supported by the browser (e.g. iOS Safari).

Then you can retrieve the image_url parameter, load and apply the texture as follows:

Assigns or updates a value of a parameter in a specified URL by automatically forming a valid if necessary, and returns the updated URL.

You can upload a texture, retrieve its server-side path and save it to the image_url parameter of the app URL as follows:

Takes a screenshot of the viewport and outputs it in format.

Invokes the browser's native dialog window for selecting files from the user's device. Once the user have selected a file, returns the file's contents in format.

#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
type
attribute
attribute
CSS property
CSS property
event listener
property
DOM window object
DOM document object
DOM body object
query string
Data URI
Data URI