Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qtquick3d
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Andy Nichols
qtquick3d
Commits
ab3665de
Commit
ab3665de
authored
5 years ago
by
Andy Nichols
Browse files
Options
Downloads
Patches
Plain Diff
Update readme to use renamed API
parent
243965b1
No related branches found
No related tags found
No related merge requests found
Pipeline
#3802
failed
5 years ago
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+8
-8
8 additions, 8 deletions
README.md
with
8 additions
and
8 deletions
README.md
+
8
−
8
View file @
ab3665de
...
@@ -8,7 +8,7 @@ Qt Quick 3D is a high level 3D API for Qt Quick. Unlike Qt3D, Qt Quick 3D enabl
...
@@ -8,7 +8,7 @@ Qt Quick 3D is a high level 3D API for Qt Quick. Unlike Qt3D, Qt Quick 3D enabl
```
```
import QtQuick 2.12
import QtQuick 2.12
import QtQuick.Window 2.12
import QtQuick.Window 2.12
import Qt
Demon
1.0
import Qt
Quick3D
1.0
Window {
Window {
id: window
id: window
...
@@ -17,21 +17,21 @@ Window {
...
@@ -17,21 +17,21 @@ Window {
height: 720
height: 720
// Viewport for 3D content
// Viewport for 3D content
Demon
View3D {
View3D {
id: view
id: view
anchors.fill: parent
anchors.fill: parent
// Scene to view
// Scene to view
Demon
Node {
Node {
id: scene
id: scene
// To render anything to a 3D viewport, you need 3 things
// To render anything to a 3D viewport, you need 3 things
// Light, Camera, Model
// Light, Camera, Model
Demon
Light {
Light {
id: directionalLight
id: directionalLight
}
}
Demon
Camera {
Camera {
id: camera
id: camera
// It's important that your camera is not inside your model
// It's important that your camera is not inside your model
// So move it back a big along the z axis
// So move it back a big along the z axis
...
@@ -40,7 +40,7 @@ Window {
...
@@ -40,7 +40,7 @@ Window {
z: -600
z: -600
}
}
Demon
Model {
Model {
id: cubeModel
id: cubeModel
// #Cube is one of the "built-in" primitive meshes
// #Cube is one of the "built-in" primitive meshes
// Other Options are #Cone, #Sphere, #Cylinder, #Rectangle
// Other Options are #Cone, #Sphere, #Cylinder, #Rectangle
...
@@ -53,7 +53,7 @@ Window {
...
@@ -53,7 +53,7 @@ Window {
// All of the default primitive meshes contain one sub-mesh, so you only
// All of the default primitive meshes contain one sub-mesh, so you only
// need 1 material.
// need 1 material.
materials: [
materials: [
Demon
DefaultMaterial {
DefaultMaterial {
// We are using the DefaultMaterial which dynamically generates a shader
// We are using the DefaultMaterial which dynamically generates a shader
// based on what properties are set. This means you don't need to write
// based on what properties are set. This means you don't need to write
// any shader code yourself. In this case we just want the cube to have
// any shader code yourself. In this case we just want the cube to have
...
@@ -66,4 +66,4 @@ Window {
...
@@ -66,4 +66,4 @@ Window {
}
}
}
}
}
}
```
```
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment