AFrame No mesh.geometry.vertices attribute in version 0.3.0 - aframe

I am trying to recreate the game tutorial from the version 0.2.0 docs using 0.3.0:
https://aframe.io/docs/0.2.0/guide/building-an-advanced-scene.html
The collider component uses the following statement:
var vertices = mesh.geometry.vertices;
In 0.3.0 it returns the error:
vertices undefined
If you print
console.log(mesh.geometry);
In version 0.2.0 vertices is returned as an attribute of geometry, but in 0.3.0 there is no such attribute.
How should I work around this?

They now default to BufferGeometry.
You can opt-out: <a-entity geometry="buffer: false">
Or old data before conversion is also stored in this.geometry.metadata.

Related

R Package Check(): "All declared Imports should be used"

Starting Situation:
I'm writing a small package of functions for myself only (not CRAN; on GitHub, but not public), and developing locally on the computer. Mostly this is me being a newbie at R and learning to write first package.
I'm using devtools and after load_all() and check(), I have been getting this "NOTE":
-- R CMD check results -------------------------------------------------------------------------------------------- MondelezR 0.1.0 ----
Duration: 21.1s
> checking dependencies in R code ... NOTE
Namespace in Imports field not imported from: 'tibble'
All declared Imports should be used.
0 errors v | 0 warnings v | 1 note x
Question:
Am I doing something wrong or is this a known/ expected problem that I can ignore?
Little more background:
I am using tibble()
In my package, "Find in Files" shows that I have used tibble in four files in different ways:
DESCRIPTION file:
[First Section of File Omitted]
Encoding: UTF-8
RoxygenNote: 7.2.0
Imports:
stringr,
dplyr,
purrr,
tibble,
magrittr
Suggests:
testthat (>= 3.0.0)
Config/testthat/edition: 3
(I have not seen the message for the other imported packages.)
FUNCTION: mdlz_otm_filter.R
[omitted]
#' #examples
#' df_otm_final <- tibble::tibble(
[omitted]
I am only using tibble in the example, not in the function itself, and the relevant portion is shown above.
DOCUMENTATION: mdlz_otm_filter.Rd
The roxygen2 documentation created from the above function shows the exact same example, but as documentation.
TEST THAT: test-mdlz_make_KEY1.R
test_that("POSTAL LANE2 works as expected", {
df_test <- tibble::tibble(ORIG_ZIP = c("18615", "12345", "a5J 1u8"),
DEST_ZIP = c("1234", "23456", "i9y2b4"),
FINAL_KEY = c("18615-01234","12345-23456","A5J1U8-I9Y2B4"))
expect_identical(mdlz_make_POSTAL_LANE(df_test$ORIG_ZIP,
df_test$DEST_ZIP),
df_test$FINAL_KEY)
})
Attempt to remove tibble from DESCRIPTION
I tried removing tibble from Imports: on the DESCRIPTION file, but as I expected would happen, I got this instead:
-- R CMD check results -------------------------------------------------------------------------------------------- MondelezR 0.1.0 ----
Duration: 26.6s
> checking for unstated dependencies in examples ... WARNING
'::' or ':::' import not declared from: 'tibble'
> checking for unstated dependencies in 'tests' ... WARNING
'::' or ':::' import not declared from: 'tibble'
0 errors v | 2 warnings x | 0 notes v
So... warnings are worse than notes I figure.
Research:
Google search to start with brought me to these posts:
RStudio Community Meta-Package This guy's problem is that he needs to use functions in every package he's trying to put in his meta-package. My issue is I'm already using tibble and getting the note regardless.
SO devtools R CMD check NOTE But this one doesn't seem to apply because I AM using tibble in my package, and this guy is trying to remove it.
Help?
I don't know how to clear the note, if I should worry about it at all, or why I'm getting it since I am using tibble as shown above. Trying to learn, so an expository answer is appreciated. Thank you in advance.
It seems devtools check function is looking for an importFrom tag with the package tibble in some of your function documentation roxygen Docs.
Adding #importFrom tibble tibble to the functions documentation which use the library tibble might remove the note.

How use Systems.henonheiles from InteractiveDynamics

I’m trying to duplicate the first example of trajectory evolution in the docs for the InteractiveDynamcis package (https://juliadynamics.github.io/InteractiveDynamics.jl/dev/trajectory/).
I’ve already created an environment into which I’ve added InteractiveDynamics, DynamicalSystems, GLMakie, and OrdinaryDiffEq.
In that environment, I executed:
using InteractiveDynamics
using DynamicalSystems, GLMakie
using OrdinaryDiffEq
But when I try to execute next…
ds = Systems.henonheiles()
… I get error:
ERROR: UndefVarError: Systems not defined
Stacktrace:
[1] top-level scope
What is Systems?
I tried to add a package named Systems but no such package was found.
Surely: ds = DynamicalSystems.henonheiles()
unless you do Systems = DynamicalSystems first
Can you share what package versions you are using? On Julia 1.6.1 with the following package versions, the code above works:
[61744808] DynamicalSystems v1.7.7
[ec714cd0] InteractiveDynamics v0.15.1
[e9467ef8] GLMakie v0.3.4
[1dea7af3] OrdinaryDiffEq v5.57.0

clustMixType version 0.2-11 cannot find silhouette_kproto

I'm trying to run the example of the silhouette_kproto function from the documentation:
https://www.rdocumentation.org/packages/clustMixType/versions/0.2-2/topics/silhouette_kproto
I've installed v 0.2-11 as shown in my SessionInfo()
other attached packages:
[1] clustMixType_0.2-11 readxl_1.1.0
But it seems that this version does not include the silhouette_kproto function, this function seems to be in version 0.2-2 as shown here:
https://www.rdocumentation.org/packages/clustMixType/versions/0.2-2/topics/silhouette_kproto
How could I install the 0.2-2 version of clustMixType? I've just run this
install.packages('clustMixType')
Is it supposed to insall the last version?
I've searched for it using
> getAnywhere(silhouette_kproto)
And it was found:
A single object matching ‘silhouette_kproto’ was found
It was found in the following places
namespace:clustMixType
Why then I get the error message when I try tu use it?
could not find function "silhouette_kproto"
The example you are referring to is from the documentation from an older version.
Please try to reproduce the example from the new version, we have restructured the functions and you should now use validation_kproto(method = "silhouette", ...) (have a look here).
Many greetings Rabea
clustmixtype

Why "image_read_svg" could not work in R?

I think I followed correctly from here. But why I got the error?
> library(magick)
Warning message:
package ‘magick’ was built under R version 3.2.5
> tiger <- image_read_svg('http://jeroen.github.io/images/tiger.svg', width = 400)
Error: could not find function "image_read_svg"
The version of magick is 0.4, how to install a newer version? I tried install.packages("magick") but it is still 0.4
> packageVersion("magick")
[1] ‘0.4’
I had an error with this function in magick version 2.2. Not same exact, but related enough that this may be useful:
Error in loadNamespace(name) : there is no package called ‘rsvg’
My error is due to R package rsvg not being installed automatically during my installation of magick. This may be your problem also. Installing it manually made function magick::image_read_svg work.
install.packages("rsvg")
library(rsvg)
library(magick)
tiger <- image_read_svg('http://jeroen.github.io/images/tiger.svg', width = 400)
print(tiger)
You should see a tiger image.
Maybe your version of magick does not have that function. We can check using apicheck (my own package, available on github).
library(apicheck)
when_fun_exists("magick::image_read_svg") # this will take some time...
But I am showing off. We could also just check the NEWS file on CRAN:
1.8
Export image_read_svg() and image_read_pdf()
Bet your version is before 1.8. You can check using packageVersion.

R radarchart rendering issues (no plot shown)

I would like to use to render a radarplot using the radarchart library in R. Everthing worked fine until I tried to change the colorscheme of the plot.
radarchart:::colourMatrix(diag(255, nrow=3))
After that, the radarchart is not plotted anymore.
What I did so far, was to remove (an re-install) radarchart and its dependencies htmltools and htmlwidgets.
=====
In Chrome the following errors are reported in the console:
Chart.min.js:12 Uncaught TypeError: Cannot convert undefined or null
to object
at Function.keys ()
at Object.o.each (Chart.min.js:12)
at Chart.min.js:14
at Object.o.each (Chart.min.js:12)
at a.determineDataLimits (Chart.min.js:14)
at a.update (Chart.min.js:13)
at Chart.min.js:12
at Object.o.each (Chart.min.js:12)
at Object.update (Chart.min.js:12)
at t.Controller.updateLayout (Chart.min.js:11) Chart.min.js:11 Uncaught TypeError: Cannot set property '_data' of undefined
at t.Controller.update (Chart.min.js:11)
at t.Controller.resize (Chart.min.js:11)
at Chart.min.js:11
at Chart.min.js:12
Before I removed both htmltools and htmlwidgets, there was another error, something like render.... not defined (but I don't remember precisely).

Resources