[wordpress插件] 3D Model Viewer3D模型查看器

wordpress 插件 文章 2020-01-21 17:40 1941 0 全屏看文

AI助手支持GPT4.0

评分

96

96

描述

This plugin allows you to show your 3D models easily in your wordpress blog.

此插件可让您在wordpress博客中轻松显示3D模型。

Simply upload the model and all files references (eg. textures) to the wordpress media gallery,

只需将模型和所有文件引用(例如纹理)上载到wordpress媒体库,

add a shortcode to the page where the model should be shown and there you go.

在应该显示模型的页面上添加一个简码,然后就可以了。

Currently, Collada DAE and OBJ and OBJ/MTL files are supported.

当前,支持Collada DAE和OBJ和OBJ / MTL文件。

Please file a request for other required file formats.

请提出其他要求的文件格式的请求。

The 3D stage is highly configurable: Define background, ambient or directional light

3D舞台高度可配置:定义背景,环境或定向光

as well as the cameras and your models position and scale.

以及相机和模型的位置和比例。

安装步骤

Install this plugin from the wordpress plugin directory as usual and activate it.

照常从wordpress插件目录安装此插件,然后将其激活。

Add the shortcode [3D], wherever you want your model to appear.

在要显示模型的任何地方添加简码[3D]。

Here are the arguments to this short code:

这是此短代码的参数:

    • model: name of the model file in the media gallery or full URL.

    • 模型:媒体库中模型文件的名称或完整URL。

      Mandatory.

      必选

      Using OBJ/MTL?

      使用OBJ / MTL?

      – Use the material option below to specify path to the mtl file.

    • –使用以下材料选项指定mtl文件的路径。

    • width, height: Size of the 3d stage.

    • 宽度,高度:3d舞台的大小。

      If in percent, then relative to the size of the div around the canvas.

      如果以百分比为单位,则相对于画布周围的div大小。

      Optional, default is 500×300.

    • 可选,默认为500×300。

    • background: Background color.

    • 背景:背景颜色。

      Optional, default is “ffffff”.

    • 可选,默认为“ ffffff”。

    • opacity: Background opacity.

    • 不透明度:背景不透明度。

      Optional, default is 1.

    • 可选,默认值为1。

    • ambient: Color of ambient light.

    • 环境:环境光的颜色。

      Optional, default is “404040”.

    • 可选,默认值为“ 404040”。

    • directional: Direction and color of directional light source.

    • directional:定向光源的方向和颜色。

      Optional, default is “1,1,1:ffffff”

    • 可选,默认值为“ 1,1,1:ffffff”

    • modelposition: Point of origin of the model.

    • modelposition:模型的原点。

      Optional, default is “0,0,0”.

    • 可选,默认值为“ 0,0,0”。

    • modelscale: Scale of the model.

    • modelscale:模型的比例。

      Optional, default is “1,1,1”.

    • 可选,默认值为“ 1,1,1”。

    • class: CSS class of div around canvas.

    • class:围绕画布的div的CSS类。

      Optional, no default.

    • 可选,没有默认值。

    • style: CSS style of div around canvas.

    • style:围绕画布的div的CSS样式。

      Optional, no default.

    • 可选,没有默认值。

    • id: id of div around canvas.

    • id:画布周围div的ID。

      Optional, default is “stage”.

    • 可选,默认为“ stage”。

    • fps: Number of animation frames per second.

    • fps:每秒动画帧数。

      Optional, default is 30.

    • 可选,默认值为30。

    • material: URL of OBJ/MTL file.
    • 材料:OBJ / MTL文件的URL。

    • camera: Camera coordinates, default is 50,50,30.
    • 相机:相机坐标,默认值为50、50、30。

    • fov: Camera field-of-view in degrees.

    • fov:摄像机视场,以度为单位。

      Default is 75.

    • 默认值为75。

    Example:

    示例:

    [3D width=”600″ height=”400″ background=”436523″ opacity=”0.5″ model=”dummy1.dae” camera=”50,50,300″ modelposition=”2,2,2″ modelscale=

    [3D width =” 600” height =” 400” background =” 436523” opacity =” 0.5” model =” dummy1.dae” camera =” 50,50,300” modelposition =” 2,2,2” modelscale =

    ”2,2,2″ ambient=”BBBBBB” directional=”1,1,0:FFFF44″ class=”3d” style=”float: right” id=”coffee” fps=20]

    “ 2,2,2”环境=“ BBBBBB”方向=“ 1,1,0:FFFF44”类=“ 3d”样式=“浮动:右” id =“咖啡” fps = 20]

下载地址

https://downloads.wordpress.org/plugin/3d-model-viewer.1.9.zip

https://downloads.wordpress.org/plugin/3d-model-viewer.1.9.zip

-EOF-

AI助手支持GPT4.0